package com.xiaozeng.clients;

import com.xiaozeng.param.ProductCollectParam;
import com.xiaozeng.pojo.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Author: xiaozeng
 * @Date: 2022 11
 * @Description: 商品客户端
 **/
@FeignClient(value = "product-service")
public interface ProductClient {

    /**
     * 商品全部数据调用
     * @return 返回所有商品
     */
    @GetMapping("/product/list")
    List<Product> list();

    /**
     * 收藏模块调用
     */
    @PostMapping("/product/ids")
    List<Product> ids(@RequestBody ProductCollectParam productCollectParam);
}